package com.gnerv.cms.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gnerv.cms.common.Result;
import com.gnerv.cms.dto.*;
import com.gnerv.cms.service.IPermissionService;
import com.gnerv.cms.service.IStatisticsApiService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 基础平台-权限表 前端控制器
 * </p>
 *
 * @author Gnerv LiGen
 * @since 2019-10-10
 */
@Api(tags = "权限管理")
@Slf4j
@CrossOrigin
@RestController
@RequestMapping("/api/manage/statistics")
public class StatisticsController {

    @Resource
    private IStatisticsApiService statisticsApiService;

    @RequestMapping(value = "/api/list", method = RequestMethod.GET)
    public Result listPStatisticsApi(StatisticsApiSearchDTO statisticsApiSearchDTO) {
        List<StatisticsApiDTO> statisticsApiDTOS = statisticsApiService.listStatisticsApiDTO(statisticsApiSearchDTO);
        return Result.response().data("statisticsApi", statisticsApiDTOS);
    }

}
